package com.fulihui.usercore.core.repository;

import java.util.List;

import com.fulihui.usercore.condition.MerchantCondition;
import com.fulihui.usercore.dto.MerchantDTO;
import com.fulihui.usercore.request.merchant.MerchantSaveRequest;
import com.fulihui.usercore.request.merchant.UpdateStateRequest;

/**
 * @author Willard.Hu on 2016/9/25.
 */
public interface MerchantRepository {

    String insert(MerchantSaveRequest request);

    boolean update(MerchantSaveRequest request);

    boolean updateState(UpdateStateRequest request);

    MerchantDTO queryByPK(String mid);

    MerchantDTO queryByName(String name, String state);

    List<MerchantDTO> queryPage(int start, int rows, MerchantCondition condition);

    int totalCount(MerchantCondition condition);
}
